package chapter10;

/**
 * @author lzy
 * @version v1.0
 * Create DateTime: 2019/3/9 14:16
 */
class Wrapping {
    private int anInt;

    public Wrapping(int anInt) {
        this.anInt = anInt;
    }

    public int value() {
        return anInt;
    }
}

public class Parcel8 {
    public static void main(String[] args) {
        Parcel8 parcel8 = new Parcel8();
        System.out.println(parcel8.wrapping(1).value());
    }

    public Wrapping wrapping(int x) {
        return new Wrapping(x) {
            @Override
            public int value() {
                return super.value() * 47;
            }
        };
    }
}
